<link type="text/css" rel="stylesheet" href="__STATIC__/home/datatime/test/jeDate-test.css">
<link type="text/css" rel="stylesheet" href="__STATIC__/home/datatime/skin/jedate.css">
<script type="text/javascript" src="__STATIC__/home/datatime/src/jedate.js"></script>
<style type="text/css">
    .layui-form-item{
        display: inline-block;
    }
    .submitjiao{
        cursor: pointer;
        background-color: #0C0C0C;
    }
</style>
<div class="page-toolbar">
    <div class="page-filter fr">
        <form class="layui-form layui-form-pane" action="{:url()}" method="get">
            <div class="layui-form-item">
                <label class="layui-form-label">注册时间</label>
                <div class="layui-input-inline" style="min-width:230px;">
                    <div class="jeinpbox"><input type="text" name="create_time" value="{:input('get.create_time')}" readonly placeholder="年月日~年月日"  id="test11A" lay-verify="required" autocomplete="off" class="layui-input"></div>
                </div>
            </div>
            {if condition="$role neq 1"}
            <div class="layui-form-item">
                <label class="layui-form-label">审核</label>
                <div class="layui-input-inline">
                    <select name="ischeck" class="field-bank_id" type="select">
                        <option value="3" selected>全部</option>
                        <option value="0" {if condition="input('get.ischeck') eq '0'"}selected{/if}>未审核</option>
                        <option value="1" {if condition="input('get.ischeck') eq '1'"}selected{/if}>已审核</option>
                    </select>
                </div>
            </div>
            {/if}
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-inline">
                    <select name="status" class="field-bank_id" type="select">
                        <option value="3" selected>全部</option>
                        <option value="1" {if condition="input('get.status') eq '1'"}selected{/if}>正常</option>
                        <option value="0" {if condition="input('get.status') eq '0'"}selected{/if}>禁用</option>

                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">关键字</label>
                <div class="layui-input-inline">
                    <input type="text" name="keyword" value="{:input('get.keyword')}" lay-verify="required" placeholder="用户姓名或手机号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="hidden" value="{$role}" name="role">
                    <input type="submit" value="搜索" class="layui-form-label submitjiao">
                </div>
            </div>
        </form>
    </div>
<!--    <div class="layui-btn-group fl">-->
<!--        <a href="javascript(0);" data-url="{:url('exportdata')}" class="layui-btn layui-btn-primary layui-icon layui-icon-add-circle-fine exportdata">&nbsp;导出数据</a>-->
<!--    </div>-->
</div>
<form id="pageListForm">
    <div class="layui-form">
        <table class="layui-table mt10" lay-even="" lay-skin="row">
            <colgroup>
                <col width="50">
            </colgroup>
            <thead>
            <tr>
                <th><input type="checkbox" lay-skin="primary" lay-filter="allChoose"></th>
                <th>用户id</th>
                <th>昵称</th>
                <th>头像</th>
                <th>手机号</th>
                <th>地址</th>
                <th>学历</th>
                <th>性别</th>
                <th>年龄</th>
                <th>身份</th>
                {if condition="$role neq 1"}
                <th>是否审核</th>
                {/if}
                <th>注册时间</th>
                <th>上次登录时间</th>
                <th>是否禁用</th>
                {if condition="$role neq 1"}
                <th>操作</th>
                {/if}

            </tr>
            </thead>
            <tbody>
            {php}
            $level = config('hs_system.member_level');
            {/php}
            {volist name="userlist" id="vo"}
            <tr>
                <td><input type="checkbox" name="ids[]" class="layui-checkbox checkbox-ids" value="{$vo['id']}" lay-skin="primary"></td>
                <td class="font12">{$vo['id']}</td>
                <td class="font12">{$vo['nickname']}</td>
                <td class="font12"><img src="{if condition="$vo['headicon']"}{$vo['headicon']}{else /}__ADMIN_IMG__/avatar.png{/if}" width="60" height="60" class="fl"></td>
                <td class="font12">{$vo['phonenum']}</td>
                <td class="font12">{if condition="$vo['address'] eq ''"}未知{else/}{$vo['address']}{/if}</td>
                <td class="font12">{if condition="$vo['education'] eq ''"}未知{else/}{$vo['education']}{/if}</td>
                <td class="font12">{if condition="$vo['gender'] eq 1"}男{else/}女{/if}</td>
                <td class="font12">{$vo['age']}</td>
                <td class="font12">{if condition="$vo['role'] eq 1"}婚恋{elseif condition="$vo['role'] eq 2"/}导师{else/}周易{/if}</td>
                {if condition="$role neq 1"}
                <td class="font12">{if condition="$vo['ischeck'] eq 0"}未审核{else/}已审核{/if}</td>
                {/if}
                <td class="font12">{$vo['create_time']}</td>
                <td class="font12">{$vo['operation_time']}</td>
                <td class="font12"><input type="checkbox"  name="status" value="{$vo.status}" lay-skin="switch" lay-filter="switchStatus" {if condition="$vo['status'] eq 0"}checked="checked"{/if} lay-text="是|否"  data-href="{:url('changestatus',array('id'=>$vo.id))}"></td>
                {if condition="$role neq 1"}
                <td style="width: 150px;">
                    <div class="layui-btn-group">
                        <div class="layui-btn-group">
                            <a href="{:url('checkuser?id='.$vo['id'])}" class="layui-btn layui-btn-primary layui-btn-sm" title="审核"><i class="layui-icon">&#xe642;</i></a>
                            <!--                            <a data-href="{:url('delete?table=home_bank&ids='.$vo['id'])}" class="layui-btn layui-btn-primary layui-btn-sm j-tr-del"><i class="layui-icon">&#xe640;</i></a>-->
                        </div>
                    </div>
                </td>
                {/if}

            </tr>
            {/volist}
            </tbody>
        </table>
        {$userlist->render()}
    </div>
</form>
{include file="admin@block/layui" /}
<script src="__STATIC__/js/jquery.2.1.4.min.js"></script>
<script type="text/javascript">
    jeDate("#test11A",{
        format: "YYYY-MM-DD hh:mm:ss",
        multiPane:false,
        range:"~"
    });

    $(".pagination a").on("click",function (e) {
        var url = $(this).attr("href");
        var formdata = $(".layui-form").serialize();
        if(url.indexOf('?')<=-1){
            url = url+"?"+formdata;
        }else{
            url = url+"&"+formdata;
        }
        e.preventDefault();
        $(location).attr('href', url);
    });
    $(".exportdata").on("click",function (e) {
        var url = $(this).attr("data-url");
        var formdata = $(".layui-form").serialize();
        if(url.indexOf('?')<=-1){
            url = url+"?"+formdata;
        }else{
            url = url+"&"+formdata;
        }
        e.preventDefault();
        location.href=url;
    });
</script>